"""
还款方式常量定义
"""
base_term = 365  # 计息天数


# 还款计划打印
def format_repay_lst(repay_lst):
    if repay_lst:
        # 打印行标题
        item = repay_lst[0]
        for title in item.keys():
            if title == "index":
                alias = "期数"
            elif title == "beg_interest":
                alias = "起息日期"
            elif title == "interest_days":
                alias = "计息天数"
            elif title == "end_date":
                alias = "还款日期"
            elif title == "amount":
                alias = "应还本金"
            elif title == "interest":
                alias = "应还利息"
            elif title == "total_fee":
                alias = "应还费用"
            elif title == "total_amount":
                alias = "期供金额"
            elif title == "remain_amount":
                alias = "剩余本金"
            else:
                alias = "其他信息"
            print(alias, end=" | ")

        # 打印具体的值
        for repay_item in repay_lst:
            print(end="\n")
            for value in repay_item.values():
                print(value, end=" | ")

    else:
        print("还款计划为空，无打印信息")
